#ifndef __GENERALPARAMETER_H
#define __GENERALPARAMETER_H

//const float PI = 3.1415926;
const float Deg2Rad = 0.017453;
const float Rad2Deg = 57.295779;

const float Rpm2Rps = 0.1047197; // RPM to rad/s
const float Rpm2Dps = 6.0000000; // RPM to degree/s

// Robotis Motor Specification
const int Rx28_PositionRange = 1024;
const int Rx28_SpeedRange = 1024;
const float Rx28_RunningDegree = 300.0;
const float Rx28_Resolution = 0.2929688; // RunningDegree/Range = 3000/1024
const float Rx28_SpeedUnit = 0.111; // Speed unit: 0.111 RPM
const float Rx28_MaxSpeed = 85; // 85rpm (at 18.5V)

const int Rx64_PositionRange = 1024;
const int Rx64_SpeedRange = 1024;
const float Rx64_RunningDegree = 300.0;
const float Rx64_Resolution = 0.2929688; // RunningDegree/Range = 3000/1024
const float Rx64_SpeedUnit = 0.111; // Speed unit: 0.111 RPM
const float Rx64_MaxSpeed = 64; // 64rpm (at 18.5V)

const int Ex106_PositionRange = 4096;
const int Ex106_SpeedRange = 1024;
const float Ex106_RunningDegree = 250.92;
const float Ex106_Resolution = 0.0612598; // RunningDegree/Range = 250.95/4096
const float Ex106_SpeedUnit = 0.111; // Speed unit: 0.111 RPM
const float Ex106_MaxSpeed = 91; // 91rpm (at 18.5V)

const int Mx106_PositionRange = 4096;
const int Mx106_SpeedRange = 1024;
const float Mx106_RunningDegree = 360.0;
const float Mx106_Resolution = 0.0878906; // RunningDegree/Range = 360/4096
const float Mx106_SpeedUnit = 0.114; // Speed unit: 0.114 RPM
const float Mx106_MaxSpeed = 55; // 55rpm (at 14.8V)

const int Mx64_PositionRange = 4096;
const int Mx64_SpeedRange = 1024;
const float Mx64_RunningDegree = 360.0;
const float Mx64_Resolution = 0.0878906; // RunningDegree/Range = 360/4096
const float Mx64_SpeedUnit = 0.114; // Speed unit: 0.114 RPM
const float Mx64_MaxSpeed = 78; // 55rpm (at 14.8V)

#endif
